﻿@model CustomerAttributeValueModel

@Html.ValidationSummary(false)
@Html.HiddenFor(model => model.Id)
@Html.HiddenFor(model => model.CustomerAttributeId)

@if (ViewBag.RefreshPage == true)
{
    <script type="text/javascript">
        try {window.opener.document.forms['@(ViewBag.formId)'].@(ViewBag.btnId).click();}
        catch (e){}
        window.close();
    </script>
}

<div class="content">
    <div class="form-horizontal">
        <div class="panel-group">
            <div class="panel panel-default">
                <div class="panel-body">
                    @(Html.LocalizedEditor<CustomerAttributeValueModel, CustomerAttributeValueLocalizedModel>("customerattributevalue-localized",
                    @<div>
                        <div class="form-group">
                            <div class="col-md-3">
                                @Html.SDFLabelFor(model => model.Locales[item].Name)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFEditorFor(model => model.Locales[item].Name)
                                @Html.ValidationMessageFor(model => model.Locales[item].Name)
                            </div>
                        </div>
                        @Html.HiddenFor(model => model.Locales[item].LanguageId)
                    </div>
    ,
                    @<div>
                        <div class="form-group">
                            <div class="col-md-3">
                                @Html.SDFLabelFor(model => model.Name)
                            </div>
                            <div class="col-md-9">
                                @Html.SDFEditorFor(model => model.Name)
                                @Html.ValidationMessageFor(model => model.Name)
                            </div>
                        </div>
                    </div>
    ))
                    <div class="form-group">
                        <div class="col-md-3">
                            @Html.SDFLabelFor(model => model.IsPreSelected)
                        </div>
                        <div class="col-md-9">
                            @Html.SDFEditorFor(model => model.IsPreSelected)
                            @Html.ValidationMessageFor(model => model.IsPreSelected)
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-md-3">
                            @Html.SDFLabelFor(model => model.DisplayOrder)
                        </div>
                        <div class="col-md-9">
                            @Html.SDFEditorFor(model => model.DisplayOrder)
                            @Html.ValidationMessageFor(model => model.DisplayOrder)
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>